
This is a quick guide for editing a file in the ark using ArkTool.
In the process it attempts to show you some ways of using ArkTool.
ArkTool runs from the command line, so open up a dos box ppl! :)


I will assume for this guide that you want to edit song and artist
names for existing songs in the game.

The game I use here is Guitar Hero 2 for the Xbox360, my main.hdr and
main_0.ark files are both located in the dir "D:\gh2_hacks\ark\x360_gh2".



1)	First you need to work out which file you want to replace. Use the
	print option for a list of files. You can use wildcards to narrow
	down your search. I know that the song names are in a data file
	(a *.dtb file) so i can do this to get a list of all dtb files in
	the ark:
	
	ArkTool -p D:\gh2_hacks\ark\x360_gh2 *.dtb
	
	This scrolls a long list of files that you may miss, so you can save
	it to a file by using a normal dos output redirection such as:
	
	ArkTool -p D:\gh2_hacks\ark\x360_gh2 *.dtb > dtblist.txt
	
	Now open up dtblist.txt and you will have your list of files to browse.
	If you want to guess what the file might be you could assume it would have
	"song" in the filename and try:
	
	ArkTool -p D:\gh2_hacks\ark\x360_gh2 *song*.dtb
	
	Now you know that the file you are after is "config/gen/songs.dtb".


2)	Next you need to get the original version of the file you want to make
	changes to. To do this you would type:
	
	ArkTool -g D:\gh2_hacks\ark\x360_gh2 config/gen/songs.dtb songs.dtb
	
	This extracts the songs.dtb into a file on your computer named "songs.dtb".
	The filename you extract to can be anything you like.
	
	
3)	The file gets automatically decrypted when it is extracted, so you could now
	directly edit it in a hex editor if you wish. Another way to edit it would be
	to use some of the existing tools for editing these files.
	
	Nachyoz wrote a great tool for editing dtb files, however it was ps2 specific,
	so I made some alterations to make it now use decrypted files so that it will work
	with any dtb files extracted by my tool. (No matter what system they're from).
	
	
4)	Now run GH2DTBEdit_unencrypted.exe and open songs.dtb in it.
	You will see a node for every song in the game. Click on the "+" of the node
	to expand the info for that node. Now you will see "name" and "artist" items.
	Expand each of these items to see the song name and artist name.
	Click on either the song name or artist name and then edit it on the right
	hand side. When you have edited all the songs you want you can save the changes
	from the file menu.


5)	Time to replace the file in the ark with our edited file, to do this type:
	
	ArkTool -r D:\gh2_hacks\ark\x360_gh2 config/gen/songs.dtb songs.dtb
	
	This will take just a couple of seconds! When its done insert the new
	main_0.ark and main.hdr files into your game image and you're ready to
	rock 'n' roll!

	NOTE: If the resultant hdr or ark file is bigger than the original ark or hdr
	files you may need to remake your disc image when reinserting these files,
	otherwise the new larger files will overlap other existing files in the disc
	image.


xorloser
www.xorloser.com

